import React from 'react'
import {DatePicker} from 'antd'
const {RangePicker} = DatePicker

class DateRangeForm extends React.Component {
  constructor (props) {
    super(props)
  }
  handleChange = (value) => {
    this.props.handleChange(value)
  }
  render () {
    return (
      <RangePicker defaultValue={[this.props.startDate, this.props.endDate]} dateFormat={this.props.dateFormat} onChange={this.handleChange} />)
  }
}
export default DateRangeForm
